Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS: Allow calling BE from browser on localhost #490

Closed
wants to merge 1 commit into from

Conversation

rtrembecky
Copy link
Contributor

@rtrembecky rtrembecky commented Dec 16, 2024

bez tohto neviem lokalne volat BE z browsru. potrebujeme to, kedze chceme public backend pod /api a zbavit sa hopu na next.js server-side.

este asi zistime, ci bude treba explicitne pridat aj test.strom.sk alebo tak... to neviem, ako funguje, ale localhost mi toto riesi.

current:
browser -> /api (next.js server-side route, rewrite) -> interny BE localhost

target:
browser -> /api (nginx proxy) -> BE

@rtrembecky rtrembecky requested a review from mmihalik December 16, 2024 13:53
@rtrembecky
Copy link
Contributor Author

tak vraj nechceme riesit CORS (co je cisto browser vec) len kvoli developmentu proti public BE. browser teda bude robit requesty dalej na tu istu domenu a v next middlewari sa to ohandli, aby sa to rewritlo

@rtrembecky rtrembecky closed this Dec 16, 2024
@rtrembecky rtrembecky deleted the cors-headers-pre-public-be branch December 16, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant